package com.agv.core.lectorDeGlobalizadoresImpl;

import java.util.ArrayList;
import java.util.Scanner;

import org.apache.log4j.Logger;

public class Remarks {

	/** Componente de logeo para la clase */
	private static final Logger log = Logger.getLogger(Rutas.class); 

	public ArrayList<String> clienteRemarks(String linea) {
		ArrayList<String> tokens = new ArrayList<String>();
		try {
			Scanner scanner = new Scanner(linea);
			String token;
			do {
				token = scanner.findInLine("/C\\d{1,2}-\\d{1,2}\\*([[^/].])+/");
				if(token!=null)
					tokens.add(token);
			} while (token != null);
		} catch (Exception e) {
			log.debug("scan exc");
		}
		return tokens;
	}

	public ArrayList<String> gRemarks(String linea) {
		ArrayList<String> tokens = new ArrayList<String>();
		try {
			Scanner scanner = new Scanner(linea);
			String token;
			do {
				token = scanner.findInLine("/C\\d{1,2}\\*([[^/].])+/");
				if(token!=null)
					tokens.add(token);
			} while (token != null);
		} catch (Exception e) {
			log.debug("scan exc");
		}
		return tokens;
	}
}
